                                 package UserUI;

import loginUI.LoginFrame;
import selectCourseUI.DropCourseFrame;
import selectCourseUI.SportCourseSelectFrame;
import courseManageUI.CourseCommentFrame;
import courseManageUI.CourseInfoFrame;
import courseManageUI.MyCourseFrame;
import selectCourseUI.SelectCourseFrame;
import userManageUI.ChangePassWordFrame;
import VO.UserVO;

public class StudentController {

	private static UserVO userVO;
	private static StudentFrame studentFrame;
	private static MyCourseFrame myCourseFrame;
	private static CourseCommentFrame courseCommentFrame;
	private static DropCourseFrame dropCourseFrame;
	private static SportCourseSelectFrame sportCourse_selectFrame;
	private static SelectCourseFrame commonCourse_selectFrame;
	private static ChangePassWordFrame changePassWordFrame;
	
	
	
	public StudentController(UserVO userVO){
		this.userVO = userVO;
		studentFrame = new StudentFrame(this.userVO);
		sportCourse_selectFrame = new SportCourseSelectFrame(this.userVO);
		commonCourse_selectFrame = new SelectCourseFrame(this.userVO,"ͨʶ");
		myCourseFrame = new MyCourseFrame(this.userVO) ;
		courseCommentFrame = new CourseCommentFrame(this.userVO);
		dropCourseFrame = new DropCourseFrame(this.userVO); 
		changePassWordFrame = new ChangePassWordFrame(this.userVO);
	}
	
	public StudentController(){
		
	}
	
	public static void jumpTo(String frame){
		switch(frame){
		case"login":
			new LoginFrame().setVisible(true);break;
		case"main":
			studentFrame.setVisible(true);break;
		case"changePassWordFrame":
			changePassWordFrame.setVisible(true);break;
		case"dropCourseFrame":
			dropCourseFrame.setVisible(true);break;
		case"sportCourse_selectFrame":
			sportCourse_selectFrame.setVisible(true);break;
		case"commonCourse_selectFrame":
			commonCourse_selectFrame.setVisible(true);break;
		case"myCourseFrame":
			myCourseFrame.setVisible(true);break;
		case"courseCommentFrame":
			courseCommentFrame.setVisible(true);break;
		
		} 
	}
}
